package com.huluobo.mvvm.model;

import com.huluobo.mvvm.db.dao.MoneyDao;
import com.huluobo.mvvm.db.dao.UserInfoDao;
import com.huluobo.mvvm.net.ApiService;
import com.huluobo.mvvm.net.RetrofitManager;
import com.huluobo.mvvm.utils.AppDBUtils;

/**
 * Created by LC on 2023/9/14.
 * 所有的Model层在MVVM模式由于名字重复,所以都改为叫做Repository(仓库)
 */
public class BaseRepo {
    protected ApiService apiService;
    protected UserInfoDao userInfoDao;
    protected MoneyDao moneyDao;

    public BaseRepo() {
        apiService = RetrofitManager.getInstance().getRetrofit().create(ApiService.class);
        userInfoDao = AppDBUtils.getInstance().getUserInfoDao();
        moneyDao = AppDBUtils.getInstance().getMoneyDao();
    }
}
